package main

import (
	"gorpc/server"
	"gorpc/server/service"
	"gorpc/transport"
)

func main() {
	srv := server.NewServer()
	calcService := &service.CalcServiceImpl{}
	srv.RegisterService(calcService)

	tcpTransport := transport.NewTCPTransport(":8080", 10, srv)
	listener, err := tcpTransport.Listen()
	if err != nil {
		panic(err)
	}
	tcpTransport.Serve(listener)
}
